package com.vineetmanohar.nitrogen;

import java.io.File;
import java.util.Iterator;

import org.apache.commons.io.FileUtils;

/**
 * Nitrogen templates are files on the file system. This class deals with all
 * aspects of template based code generation.
 * 
 * @author vineetmanohar
 */
public class TemplateGenerator {
	public static void generateFromTemplates(Model rootModel, File inputDir,
			File outputDir) {
		// scan and find all the templates
		@SuppressWarnings("unchecked")
		Iterator<File> templateIterator = FileUtils.iterateFiles(inputDir,
				null, true);

		while (templateIterator.hasNext()) {
			File template = templateIterator.next();
			generateFromTemplate(rootModel, inputDir, template, outputDir);
		}
	}

	private static void generateFromTemplate(Model rootModel, File inputDir,
			File template, File outputDir) {
		// TODO Auto-generated method stub
		
	}
}